All Questions
Tagged with loggingunit-testing
5 questions
2votes
1answer
221views
Choosing test method of bash command output with bats
Context While writing a bash script I would like to test every command I write. To do so I create a separate function per command that executes the function. In addition I want to log the output of ...
2votes
3answers
2kviews
What is the proper logging level for tests?
I raised an issue at my employer concerning our gigantic heaps of testing logs. I raised the issue because I was spending well over a minute to find the relevant logs and stack-trace. I stated we ...
15votes
6answers
11kviews
Should log statements be tested?
When writing tests I usually ignored logging statements, but now I wonder if it was right. The logs are often important tools when diagnosing production issues, moreover there can even be ...
43votes
9answers
7kviews
Do we need Logging when doing TDD?
When doing the Red, Green & Refactor cycle we should always write the minimum code to pass the test. This is the way I have been taught about TDD and the way almost all books describe the process. ...
0votes
1answer
1kviews
How to unit test a class which is just an adapter that logs input and output to a third-party library?
I have the following (in C#, but the question could also apply to Java): public interface ILibraryAdapter { string Property1 { get; } string Method1(string param1); ... } public class ...